using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;

using Microsoft.Practices.CompositeUI;
using Microsoft.Practices.CompositeUI.WinForms;
using Microsoft.Practices.CompositeUI.EventBroker;
using Microsoft.Practices.CompositeUI.Commands;

using LibrErian.Common;
using LibrErian.Common.Constants;


namespace LibrErian.Gui
{
	public class ShellApplication : FormShellApplication<ShellWorkItem<ShellController>, frmMain>
	{
		[STAThread]
		public static void Main()
		{
			new ShellApplication().Run();
		}

        protected override void AfterShellCreated()
        {
            base.AfterShellCreated();

            RootWorkItem.Workspaces.AddNew<WindowWorkspace>(WorkspaceNames.WindowWorkspace);

            RootWorkItem.UIExtensionSites.RegisterSite(UIElementNames.MainToolStrip, Shell.MainToolStrip);
            RootWorkItem.UIExtensionSites.RegisterSite(UIElementNames.MainMenuStrip, Shell.MainMenuStrip);
        }

        protected override void AddServices()
        {
            base.AddServices();

            RootWorkItem.Services.AddNew<WorkspaceLocatorService, IWorkspaceLocatorService>();
        }
	}
}
